import 'package:efood_multivendor/data/api/api_client.dart';
import 'package:efood_multivendor/data/model/body/send_points_body.dart';
import 'package:efood_multivendor/util/app_constants.dart';
import 'package:get/get.dart';
import 'package:get/get_connect/http/src/response/response.dart';

class TransactionRepo {
  final ApiClient apiClient;
  TransactionRepo({required this.apiClient});

  Future<Response> getTransactionDetails(int offset) async {
    return await apiClient
        .getData('${AppConstants.Wallet}?offset=$offset&limit=11');
  }

  Future<Response> sendPoints(SendPointsBody sendPoints) async {
    print(sendPoints.toJson().toString());
    return await apiClient.postData(
        '${AppConstants.TRANSFER_WALLET_POINTS}', sendPoints.toJson());
  }
}
